const state = {
  subjectInfo: [] // 学科信息
}

const mutations = {
  uploadSubjectInfo(state, payload) {
    console.log(payload);
    state.subjectInfo = payload.data
  }
}

const actions = {
  async getSubjectInfo(context) {
    const data = await getSubjectInfo()
    context.commit('uploadSubjectInfo', data)
  }
}
import { getSubjectInfo } from '@/api/class'
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
